package com.xmy.cultivate.controller;

import com.xmy.cultivate.entity.respense.StudentStatus;
import com.xmy.cultivate.service.IStudentGradeService;
import com.xmy.cultivate.util.Result;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 订单报名信息 前端控制器
 * </p>
 *
 * @author hpiggy
 * @since 2023-08-17
 */
@RestController
@RequestMapping("/api/orderDetail")
@Scope("prototype")
public class OrderDetailController {

    @Autowired
    IStudentGradeService iStudentGradeService;

    @GetMapping("/getStudentReadingStatus")
    public StudentStatus getStudentReadingStatus(@RequestParam("studentId") Long studentId){
        Integer lessonType = 1;
        StudentStatus studentStatus = iStudentGradeService.getStudentStatus(studentId,lessonType);
        return studentStatus;
    }
}
